import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index/index'
import login from '@/components/index/login'
import register from '@/components/index/register'
import service from '@/components/index/service'
import handbook from '@/components/index/handbook'
import getBack from '@/components/index/getBack'

import basic from '@/components/information/basic'
import risk from '@/components/information/risk'
import resources from '@/components/information/resources'
import personset from '@/components/person/personset'
import search from '@/components/search/search'
import changepsd from '@/components/changePsd/changepsd'
import editplan from '@/components/plan/editplan'
import planmanage from '@/components/plan/planmanage'
import comAssess from '@/components/expert/comAssess'
import waitAssess from '@/components/expert/waitAssess'
import assessed from '@/components/expert/assessed'
import assessedAll from '@/components/expert/assessedAll'
import checkAssessed from '@/components/expert/checkAssessed'
import keyexam from '@/components/examine/keyexam'
import personexam from '@/components/examine/personexam'
import powerexam from '@/components/examine/powerexam'
import situationexam from '@/components/examine/situationexam'
import details from '@/components/index/detail'
// import ideaAll from '@/components/companyAssess/ideaAll'
import onlineAssess from '@/components/companyAssess/onlineAssess'
import underlineAssess from '@/components/companyAssess/underlineAssess'
// import formExpert from '@/components/companyAssess/formExpert'
import assessedAlls from '@/components/expert/assessedAlls'

import templete from '@/components/plan/templete'
import changepsd2 from '@/components/changePsd/changepsd2'
import uploadSign from '@/components/expert/uploadSign'
import estimate from '@/components/plan/estimate'
Vue.use(Router)


export const StaticRouterMap = [{
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/login',
    name: 'login',
    component: login
  }, {
    path: '/register',
    name: 'register',
    component: register
  },
]

export const CompanyRouterMap = [{
    path: '/index',
    name: 'index',
    component: index
  },

  {
    path: '/service',
    name: 'service',
    component: service
  },
  {
    path: '/handbook',
    name: 'handbook',
    component: handbook
  },
  {
    path: '/getBack',
    name: 'getBack',
    component: getBack
  },
  {
    path: '/basic',
    name: 'basic',
    component: basic
  },
  {
    path: '/risk',
    name: 'risk',
    component: risk
  },
  {
    path: '/resources',
    name: 'resources',
    component: resources
  },
  {
    path: '/personset',
    name: 'personset',
    component: personset
  },
  {
    path: '/search',
    name: 'search',
    component: search
  },
  {
    path: '/changepsd',
    name: 'changepsd',
    component: changepsd
  },
  {
    path: '/editplan',
    name: 'editplan',
    component: editplan
  },
  {
    path: '/planmanage',
    name: 'planmanage',
    component: planmanage
  },
  {
    path: '/comAssess',
    name: 'comAssess',
    component: comAssess
  },
  {
    path: '/waitAssess',
    name: 'waitAssess',
    component: waitAssess
  },
  {
    path: '/assessed',
    name: 'assessed',
    component: assessed
  },
  {
    path: '/assessedAll',
    name: 'assessedAll',
    component: assessedAll
  },
  {
    path: '/checkAssessed',
    name: 'checkAssessed',
    component: checkAssessed
  },
  {
    path: '/personexam',
    name: 'personexam',
    component: personexam
  },
  {
    path: '/situationexam',
    name: 'situationexam',
    component: situationexam
  },
  {
    path: '/keyexam',
    name: 'keyexam',
    component: keyexam
  },
  {
    path: '/powerexam',
    name: 'powerexam',
    component: powerexam
  },
  {
    path: '/details',
    name: 'details',
    component: details
  },
  {
    path: '/onlineAssess',
    name: 'onlineAssess',
    component: onlineAssess
  },
  {
    path: '/underlineAssess',
    name: 'underlineAssess',
    component: underlineAssess
  }
  /* ,
  {
      path: '/formExpert',
      name: 'formExpert',
      component: formExpert
  }
  ,
  {
      path: '/ideaAll',
      name: 'ideaAll',
      component: ideaAll
  } */
  ,
  {
    path: '/assessedAlls',
    name: 'assessedAlls',
    component: assessedAlls
  },
  {
    path: '/templete',
    name: 'templete',
    component: templete
  },
  {
    path: '/changepsd2',
    name: 'changepsd2',
    component: changepsd2
  },
  {
    path: '/uploadSign',
    name: 'uploadSign',
    component: uploadSign
  },
  {
    path: '/estimate',
    name: 'estimate',
    component: estimate
  }
]
// export default new Router({
export default new Router({
  scrollBehavior: () => ({
    y: 0
  }),
  routes: [...StaticRouterMap, ...CompanyRouterMap]
})
